package com.mapple.consume;

import com.mapple.common.exception.RRException;
import com.mapple.common.utils.LoggerUtil;
import org.junit.jupiter.api.Test;

/**
 * @author zsc
 * @version 1.0
 * @date 2022/4/22 23:55
 */
public class ExTets {
    @Test
    public void test() {

        boolean flag = false;
        //处理支付消息
        LoggerUtil.getLogger().info("支付消息正在消费，订单id为: {}", "666666");
        try {
            //支付
            boolean payFlag = pay();
            LoggerUtil.getLogger().info("orderId为：{}的订单支付状态为：{}", 66666, payFlag);
            if (!payFlag)
                flag = true;
        } catch (Exception e) {
            flag = true;
        }
        LoggerUtil.getLogger().info("处理结果{}", flag);

        //后续....
    }


    //
    public boolean pay() {

        throw new RRException("支付异常");
    }
}
